import request from './network.js'

// const headers = {'content-type': 'application/x-www-form-urlencoded'};
// let userInfoData = my.getStorageSync({ key: 'userInfo' });
// let header = {
//   'content-type': 'application/x-www-form-urlencoded',
//   'Authorization': userInfoData.data.token
// };
// let header = '';
// let userInfoData = my.getStorageSync({ key: 'userInfo' });
// console.log(userInfoData.data)
// if(userInfoData.data == '' || userInfoData.data == undefined || userInfoData.data == null) {
//   header = {'content-type': 'application/x-www-form-urlencoded'};
// }else {
//   header = {
//     'content-type': 'application/x-www-form-urlencoded',
//     'Authorization': userInfoData.data.token
//   };
// }


// 意见反馈图片上传
export function feekUploadFile(prams, header) {
  return request({
    url: '/file/imageUploads',
    headers: header,
    method: 'POST',
    data: {"data": prams}
  })
}

// 删除图片
// export function imageDelete(prams) {
//   return request({
//     url: '/file/imageDelete',
//     headers: header,
//     method: 'POST',
//     data: {"data": prams}
//   })
// }
export function imageDelete(prams, header) {
  return request({
    url: '/file/imageDeletes',
    headers: header,
    method: 'POST',
    data: {"data": prams}
  })
}